package com.tzy.evaluation.mapper;
import com.tzy.common.entity.UserLikes;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户点赞表 Mapper 接口
 * </p>
 *
 * @author 谭同学
 * @since 2022-03-26
 */
public interface UserLikesMapper extends BaseMapper<UserLikes> {
    /**
     *
     * @param likedUserId
     * @param likingUserId
     * @return
     */
    @Select(" select id,user_Id from user_likes " +
            "where liked_User_Id = #{likedUserId} " +
            "and liking_User_Id = #{likingUserId}  ")
    public UserLikes findByLikedUserIdAndLikedPostId(int likedUserId, int likingUserId);

}
